<template>
  <view class="order-date-info">
    <view class="date-info">
      <text>{{ date||''|formatDate('YYYY-MM-DD HH:mm') }}</text>
    </view>
    <view class="action-wrap">
      <uni-icons v-if="!showMore" type="arrowdown" size="20" color="#999" @click="handleClickArrow(true)"></uni-icons>
      <uni-icons v-else type="arrowup" size="20" color="#999" @click="handleClickArrow(false)"></uni-icons>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    date: {
      type: [Number, String],
      default() {
        return 1;
      }
    },
    showMore: {
      type: Boolean,
      default() {
        return false;
      }
    }
  },
  model: {
    prop: "showMore",
    event: "change"
  },
  methods: {
    handleClickArrow(showMore) {
      this.$emit("change", showMore);
    }
  }
};
</script>

<style lang="scss" scoped>
$padding-left: 50rpx;
$padding-top: 20rpx;
$font-size-base: $uni-font-size-lg;
$font-size-ms: $uni-font-size-base;
.order-date-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  .date-info {
    font-size: $font-size-base;
    color: $uni-text-color-grey;
  }
  .action-wrap {
  }
}
</style>